/**
 * Copyright 2011 Enjoy Change, Inc. All rights reserved.
 * Use is subject to license terms.
 */
package com.enjoychange.enjoy.domain.specification;

import com.enjoychange.common.tool.MD5Helper;
import com.enjoychange.enjoy.domain.Account;
import com.enjoychange.enjoy.infrastructure.IAccountRepository;

/**
 * @author l90003709
 *
 */
public class AccountSpecification {

	public static boolean isAccountExist(IAccountRepository accountRepository,
			Account account) {
		return accountRepository.isAccountExist(account);
	}

	public static boolean isValidateAccount(String inputPassword, String dbPassword) {
		return dbPassword.equals(MD5Helper.encrypt(inputPassword));

	}
}
